package cn.hallele.leinsteining.ms.auditcenter.controller;

import cn.hallele.leinsteining.mc.infrastructure.metadata.io.Page;
import cn.hallele.leinsteining.mc.infrastructure.metadata.io.Response;
import cn.hallele.leinsteining.mc.sdk.auditcenter.api.LogApi;
import cn.hallele.leinsteining.mc.sdk.auditcenter.common.constants.ApiPathConst;
import cn.hallele.leinsteining.mc.sdk.auditcenter.dto.AuditLogDTO;
import cn.hallele.leinsteining.mc.sdk.auditcenter.dto.AuditLogQueryDTO;
import cn.hallele.leinsteining.ms.support.starter.components.audit.annotation.ApiLog;
import cn.hallele.leinsteining.ms.support.starter.components.controller.io.Res;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * 审计日志记录管理接口
 *
 * @author anle5
 * @since 2024/7/28 16:50
 */
@Slf4j
@RestController
@RequestMapping(ApiPathConst.LOG_V1)
public class LogController implements LogApi {
    /**
     * 分页查询审计日志
     *
     * @param condition 查询条件
     * @return 分页结果
     */
    @Override
    @ApiLog(id = "QUERY_AUDIT_LOG")
    public Response<Page<AuditLogDTO>> auditlog(@Valid Page<AuditLogQueryDTO> condition) {
        return Res.ok(Page.<AuditLogDTO>builder()
                .data(new ArrayList<>())
                .build());
    }
}
